/**
 * @date 10:34:24 AM
 * EducationSubjectLesson.java
 * Administrator
 * TODO
 */
package com.qs.education.controller;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.qs.education.bean.api.ResponseListBean;
import com.qs.education.bean.entity.EducationQuestion;
import com.qs.education.bean.entity.EducationSubjectLesson;
import com.qs.education.service.ISubjectLessonAPPService;
/**
 * @class EducationSubjectLesson	
 * @author Warren
 * @description
 * @date Nov 20, 2018 
 */
@RestController
public class EducationSubjectLessonController {
	
	@Autowired
	private ISubjectLessonAPPService iSubjectLessonAPPService;
	
	@RequestMapping("/subjectLesson/getALL")
	public ResponseListBean<EducationSubjectLesson> getALL() {
		ResponseListBean<EducationSubjectLesson> responselistBean = iSubjectLessonAPPService.getALL();	
		return responselistBean;
	} 
		
	/**
	 * @Description 根据课时 显示 选择课时内题目   和  数量
	 * @author Leon
	 * @date   Nov 20, 2018
	 * @param  
	 * @return ResponseListBean<EducationSubjectLesson>
	 */
	@RequestMapping("/subjectLesson/selectTopicAndNumber")
	public ResponseListBean<EducationSubjectLesson> selectTopicAndNumber(@RequestParam(value="lessonIds") String lessonIds){
		ResponseListBean<EducationSubjectLesson> lessonList = iSubjectLessonAPPService.selectTopicAndNumber(lessonIds);
		System.out.println(lessonIds);
		return lessonList;
	}
	
	/**
	 * @Description 根据选择的课时 题目数量  场景  以及 题目难度进行 智能组题
	 * @author Leon
	 * @date   Nov 21, 2018
	 * @param  params：[
	 * 					{lessonId:1,number:2},
	 * 					{lessonId:2,number:3}
	 * 				  ]
	 * 		   scenes: 场景
	 * 		   level ： 等级
	 * @return ResponseListBean<EducationQuestion>
	 */
	@RequestMapping("/subjectLesson/getQuestionListByLesson")
	public ResponseListBean<EducationQuestion> getQuestionListByLesson(String params,String scenes,String level){
		ResponseListBean<EducationQuestion> questionList = iSubjectLessonAPPService.getQuestionListByLesson(params, scenes, level);
		return questionList;
	}
	
}
